set the member of sprite the spriteNum of me to member the downMember of me
set the button_active of me to 1
end
on mouseUp me
set the member of sprite the spriteNum of me to the theName of me && "on"
set the button_active of me to 0
updateStage()
end
on mouseEnter me
if the button_active of me then
set the member of sprite the spriteNum of me to member the downMember of me
end if
end
on mouseLeave me
if the button_active of me then
set the member of sprite the spriteNum of me to member the upMember of me
end if
end
on mouseUpOutSide me
set the button_active of me to 0
end
on beginSprite me
set the upMember of me to the member of sprite the spriteNum of me
set the theName of me to the name of member the member of sprite the spriteNum of me
set the button_active of me to 0
end
on endSprite me
end
on getPropertyDescriptionList
if the currentSpriteNum = 0 then
set memdefault to 0
else
set memref to the member of sprite the currentSpriteNum
set castLibNum to the castLibNum of memref
set memdefault to member (the memberNum of member memref + 1) of castLib castLibNum
end if
set p_list to [#downMember: [#comment: "Down state member:", #format: #graphic, #default: memdefault]]
return p_list
end
on getBehaviorDescription
return "Makes a sprite work as a pushbutton with down state and mouse tracking. The sprite's initial castmember represents the button's normal state." & RETURN & "PARAMETERS:" & RETURN & "• Down member - Choose the cast member to display when the button is pressed. The default value is the cast member immedietly following the sprite's current cast member."